﻿using IterationLife.Domains.Sports.Models;
using IterationLife.Domains.Sports.Repositories;
using Util.Datas.Ef;

namespace IterationLife.Datas.Repositories.Sports
{
    /// <summary>
    /// SportUsers仓储
    /// </summary>
    public class SportUserRepository : RepositoryBase<SportUser>, ISportUserRepository
    {
        /// <summary>
        /// 初始化SportUsers仓储
        /// </summary>
        /// <param name="unitOfWork">工作单元</param>
        public SportUserRepository(IApplicationUnitOfWork unitOfWork) : base(unitOfWork)
        {
        }

        public bool IsUserExist(int uid)
        {
            var partnerUserId = uid.ToString();
            return Exists(t => t.PartnerUserId == partnerUserId);
        }

    }
}
